package cn.z2huo.demo.hello.kafka.api;

import cn.z2huo.demo.hello.kafka.support.ConsumerRunner;

/**
 * <p>存取运行中的{@link ConsumerRunner} 实例的服务规范
 *
 * @author z2huo
 */
public interface KafkaConsumerRunnerDAO {

    /**
     * 添加保存一个 {@link ConsumerRunner} 实例
     * @param name
     * @param consumerRunner
     */
    void add(String name, KafkaConsumable consumerRunner);

    /**
     * 用唯一标识查询实例
     * @param name
     * @return
     */
    KafkaConsumable get(String name);

}
